require ( "Box2D" )

--display:create ( "Box2D Constants", 640, 480, 32, true )

local dm = DisplayMode ( )
dm.width = 640
dm.height = 480
dm.depth = 32
dm.windowed = true
display:set_mode ( dm )


local f = Font()
f:load_system ( "Courier", 16 )

local sprite = Sprite ( 0, 0 )
sprite.canvas:set_font ( f, YELLOW )
display.viewport:add_child ( sprite )

local sz = "Box2D constants\n\n"
sz = sz .. "b2_maxManifoldPoints = " .. b2_maxManifoldPoints .. "\n"
sz = sz .. "b2_maxPolygonVertices = " .. b2_maxPolygonVertices .. "\n"
sz = sz .. "b2_maxProxies = " .. b2_maxProxies .. "\n"
sz = sz .. "b2_maxPairs = " .. b2_maxPairs .. "\n"
sz = sz .. "b2_linearSlop = " .. b2_linearSlop .. "\n"
sz = sz .. "b2_angularSlop = " .. b2_angularSlop .. "\n"
sz = sz .. "b2_toiSlop = " .. b2_toiSlop .. "\n"
sz = sz .. "b2_maxTOIContactsPerIsland = " .. b2_maxTOIContactsPerIsland .. "\n"
sz = sz .. "b2_velocityThreshold = " .. b2_velocityThreshold .. "\n"
sz = sz .. "b2_maxLinearCorrection = " .. b2_maxLinearCorrection .. "\n"
sz = sz .. "b2_maxAngularCorrection = " .. b2_maxAngularCorrection .. "\n"
sz = sz .. "b2_maxLinearVelocity = " .. b2_maxLinearVelocity .. "\n"
sz = sz .. "b2_maxLinearVelocitySquared = " .. b2_maxLinearVelocitySquared .. "\n"
sz = sz .. "b2_maxAngularVelocity = " .. b2_maxAngularVelocity .. "\n"
sz = sz .. "b2_maxAngularVelocitySquared = " .. b2_maxAngularVelocitySquared .. "\n"
sz = sz .. "b2_contactBaumgarte = " .. b2_contactBaumgarte .. "\n"
sz = sz .. "b2_timeToSleep = " .. b2_timeToSleep .. "\n"
sz = sz .. "b2_linearSleepTolerance = " .. b2_linearSleepTolerance .. "\n"
sz = sz .. "b2_angularSleepTolerance = " .. b2_angularSleepTolerance .. "\n"
--sz = sz .. "b2_version = " .. b2_version.major .. "." .. b2_version.minor .. "." .. b2_version.revision .. "\n"

sprite.canvas:move_to ( -320 + 4, 240 - 16 )
sprite.canvas:write ( sz )
